package com.hehua.web.factory;

public class OperationSimpleFactory {

    public static Operation createOperation(String operation) {
        Operation operationObj = null;
        switch (operation) {
            case "+":
                operationObj = new OperationAdd();
                break;
            case "-":
                operationObj = new OperationSub();
                break;
            default:
                break;
        }
        return operationObj;
    }
}
